
all: main test

main: main.o func.o Polynomial.o InterConditions.o NewtonInterp.o
	g++ -g -o main main.o func.o Polynomial.o InterConditions.o NewtonInterp.o -std=c++11
test: test.o Polynomial.o InterConditions.o NewtonInterp.o
	g++ -g -o test test.o Polynomial.o InterConditions.o NewtonInterp.o -std=c++11
Polynomial.o: Polynomial.cpp Polynomial.h
	g++ -c Polynomial.cpp -std=c++11
InterConditions.o: InterConditions.cpp InterConditions.h
	g++ -c InterConditions.cpp -std=c++11
NewtonInterp.o: NewtonInterp.cpp NewtonInterp.h
	g++ -c NewtonInterp.cpp -std=c++11
func.o: func.cpp func.h
	g++ -c func.cpp -std=c++11
main.o: main.cpp
	g++ -c main.cpp -std=c++11
test.o: test.cpp
	g++ -c test.cpp -std=c++11
debug: main.cpp func.cpp NewtonInterp.cpp InterConditions.cpp Polynomial.cpp NewtonInterp.h InterConditions.h Polynomial.h func.h
	g++ -g -o main main.cpp func.cpp  NewtonInterp.cpp InterConditions.cpp Polynomial.cpp -std=c++11

doc: Programming.tex
	pdflatex Programming.tex
	-rm *.aux *.log *.gz
	evince Programming.pdf
clean:
	-rm main
	-rm test
	-rm *.o
